<h1>New roles_user</h1>

<% form_for(@roles_user) do |f| %>
  <%= f.error_messages %>
  <p>
    <select name="roles_user[user_id]">
    <% @user.each do |user| %>
      <option value="<%= user.id %>">
        <%= user.name %>
      </option>
    <% end %>
    </select>
  </p>
  <p>
  <select name="roles_user[role_id]">
    <% @role.each do |role| %>
      <option value="<%= role.id %>">
        <%= role.name %>
      </option>
    <% end %>
  </select>
  </p>
  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

<%= link_to 'Back', roles_users_path %>